1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-11 23:27:55 +02:00
Commit Graph

569 Commits

Author SHA1 Message Date
Stefano Sabatini
bb4c0abc7c ffplay: mark i variable in toggle_full_screen() as unused
Fix gcc warning:
ffplay.c: In function ‘toggle_full_screen’:
ffplay.c:2792:9: warning: unused variable ‘i’ [-Wunused-variable]
2012-01-15 14:51:59 +01:00
Marton Balint
1348420b8a ffplay: silence buffer size must be a multiple of frame size
Otherwise the audio channels sometimes would be shifted on output.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-01-11 23:10:45 +01:00
Marton Balint
6f06545b26 ffplay: use swr_set_compensation for audio synchronization
Also change synchronize_audio to only calculate the wanted number of samples
instead of doing the actual synchronization, and make swr_convert handle the
sample addition or deletion.

This new method replaces the old buggy way which simply deleted or
multiplied samples.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-01-11 23:05:33 +01:00
Michael Niedermayer
73f2cf4ed9 ffplay: Exit on ctrl-c.
This allows to get out of ffplay if it or SDL got stuck.
This for example happens when the audio driver is playing something
else and doesnt support mixing multiple sources.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-01-09 23:22:56 +01:00
Stefano Sabatini
ceef1ee767 cmdutils: make show_usage() use av_log()
Avoid printing on stdout when show_usage is used in an error message.
2012-01-07 11:02:13 +01:00
Marton Balint
8ee77fc8d4 ffplay: fix invalid wanted_channel_layout calculation
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-01-05 20:04:23 +01:00
Marton Balint
5d94f28e9e ffplay: honor SDL_AUDIO_CHANNELS and make sure to use SDL supported number of audio channels
Fixes ticket #838.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-01-05 20:04:15 +01:00
Michael Niedermayer
4121148388 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: make -frames work for all types of streams, not just video.
  bfi: K&R cosmetics
  bgmc: K&R cleanup
  rawdec: Set start_time to 0 for raw audio files.
  Detect 'yuv2' as rawvideo also in avi.
  rawdec: propagate pict_type information to the output frame
  rawdec: Support more QT 1bpp rawvideo files.
  avconv: free bitstream filters
  threads: limit the number of automatic threads to MAX_AUTO_THREADS
  avplay: K&R cleanup
  fate: use rgb24 as output format for dfa tests
  threads: set thread_count to 1 when thread support is disabled
  threads: introduce CODEC_CAP_AUTO_THREADS and add it to libx264

Conflicts:
	ffplay.c
	libavcodec/avcodec.h
	libavcodec/pthread.c
	libavcodec/version.h
	tests/ref/fate/dfa1
	tests/ref/fate/dfa10
	tests/ref/fate/dfa11
	tests/ref/fate/dfa2
	tests/ref/fate/dfa3
	tests/ref/fate/dfa4
	tests/ref/fate/dfa5
	tests/ref/fate/dfa6
	tests/ref/fate/dfa7
	tests/ref/fate/dfa8
	tests/ref/fate/dfa9

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-02 03:10:30 +01:00
Stefano Sabatini
93613338fe ff* tools: move descriptions from copyright header to @file doxy 2011-12-27 12:58:08 +01:00
Michael Niedermayer
452406bd5b ff*: Fix duplicatedly printed version info with -version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 22:23:12 +01:00
Marton Balint
708df4ac66 ffplay: remove global video state
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-19 21:38:41 +01:00
Michael Niedermayer
7c29313b38 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in revision for AVFrame.age deprecation
  avcodec: deprecate AVFrame.age
  4xm: remove unneeded check for remaining unused data.
  lavf: force threads to 1 in avformat_find_stream_info()
  swscale: fix overflows in vertical scaling at top/bottom edges.
  lavf: add OpenMG audio muxer.
  omadec: split data that will be used in the muxer to a separate file.
  lavf: rename oma.c -> omadec.c
  tmv decoder: set correct pix_fmt

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavformat/oma.c
	libavformat/version.h
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-19 02:34:18 +01:00
Michael Niedermayer
efe8a1ba08 ffplay: clear pkt_temp when pkt is freed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-14 21:22:29 +01:00
Michael Niedermayer
a5a1e3cb8a ffplay: Fix got_frame type.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-14 21:21:22 +01:00
Panagiotis H.M. Issaris
91a3ea671a ffplay: add 10 minute seek support to ffplay
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-14 21:09:08 +01:00
Marton Balint
9fb2b41258 ffplay: force setting video mode on fullscreen toggle
Fixes ticket #736. Based on the patch by glangshaw.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-14 21:09:08 +01:00
Michael Niedermayer
16b771b1f4 cleanup: for(int
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 21:08:43 +01:00
Michael Niedermayer
8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Michael Niedermayer
7fad19a63d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: cabac: replace explicit memory references with "m" operands
  avplay: don't request a stereo downmix
  wmapro: use av_float2int()
  lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
  lavu: replace int/float punning functions
  lavfi: install libavfilter/vsrc_buffer.h
  Remove extraneous semicolons
  sdp: Restore the original mp4 format h264 extradata if converted
  rtpenc: Add support for mp4 format h264
  rtpenc: Simplify code by introducing a separate end pointer
  movenc: Use the actual converted sample for RTP hinting
  Fix a bunch of common typos.

Conflicts:
	doc/developer.texi
	doc/eval.texi
	doc/filters.texi
	doc/protocols.texi
	ffmpeg.c
	ffplay.c
	libavcodec/mpegvideo.h
	libavcodec/x86/cabac.h
	libavfilter/Makefile
	libavformat/avformat.h
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/gxfenc.c
	libavformat/img2.c
	libavformat/movenc.c
	libavformat/mpegts.c
	libavformat/rtpenc_h264.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-12 01:25:37 +01:00
Hanspeter Niederstrasser
bed04e2b03 Correct use of OSX to Mac OS X and properly format yasm providers on Mac OS X
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-11 03:00:30 +01:00
Michael Niedermayer
b404ab9e74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Don't av_malloc(0).
  avconv: only allocate 1 AVFrame per input stream
  avconv: fix memleaks due to not freeing the AVFrame for audio
  h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg).
  misc Doxygen markup improvements
  doxygen: eliminate Qt-style doxygen syntax
  g722: Add a regression test for muxing/demuxing in wav
  g722: Change bits per sample to 4
  g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample
  api-example: update to use avcodec_decode_audio4()
  avplay: use avcodec_decode_audio4()
  avplay: use a separate buffer for playing silence
  avformat: use avcodec_decode_audio4() in avformat_find_stream_info()
  avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3()
  mov: Allow empty stts atom.
  doc: document preferred Doxygen syntax and make patcheck detect it

Conflicts:
	avconv.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/version.h
	libavformat/mov.c
	tests/codec-regression.sh
	tests/fate/h264.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 01:37:27 +01:00
Michael Niedermayer
406e9647a0 ffplay: Avoid directly accessing AVFrame fields that differ between forks.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 03:22:10 +01:00
Michael Niedermayer
59a58884b9 ffplay: Copy audio side data too. This fixes handling of some rare nellymoser files that change the sample rate mid stream (sample file at: http://trac.videolan.org/vlc/ticket/5586)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-12-01 20:55:01 +01:00
Michael Niedermayer
6d13499be0 cmdutils: pass AVCodec to filter_codec_opts()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-27 21:17:56 +01:00
Michael Niedermayer
2c28e26913 ffplay: Check for pix_fmt changes Fixes Ticket238 by not crashing but also not playing the file.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-11-21 20:20:48 +01:00
Michael Niedermayer
e161b079de Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  configure: add check for w32threads to enable it automatically
  rtmp: do not hardcode invoke numbers
  cinepack: return non-generic errors
  fate-lavf-ts: use -mpegts_transport_stream_id option.
  Add an APIchanges entry and a minor bump for avio changes.
  avio: Mark the old interrupt callback mechanism as deprecated
  avplay: Set the new interrupt callback
  avconv: Set new interrupt callbacks for all AVFormatContexts, use avio_open2() everywhere
  cinepak: remove redundant coordinate checks
  cinepak: check strip_size
  cinepak, simplify, use AV_RB24()
  cinepak: simplify, use FFMIN()
  cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
  applehttp: Fix seeking in streams not starting at DTS=0
  http: Don't use the normal http proxy mechanism for https
  tls: Handle connection via a http proxy
  http: Reorder two code blocks
  http: Add a new protocol for opening connections via http proxies
  http: Split out the non-chunked buffer reading part from http_read
  segafilm: add support for raw videos
  ...

Conflicts:
	avconv.c
	configure
	doc/APIchanges
	libavcodec/cinepak.c
	libavformat/applehttp.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/ref/lavf/ts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-19 02:00:06 +01:00
Clément Bœsch
eafa2b6005 swr: introduce a public function to customize the channel mapping. 2011-11-17 18:30:03 +01:00
Clément Bœsch
645c61fb2b swr: rename swr_alloc2() to swr_alloc_set_opts(). 2011-11-17 10:16:07 +01:00
Michael Niedermayer
109d23e0b4 ffplay: use av_noreturn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 04:25:35 +01:00
Michael Niedermayer
8cd210700b Merge remote-tracking branch 'cus/stable'
* cus/stable:
  ffplay: limit lowres to the maximum supported. Fixes Ticket591

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 20:51:49 +01:00
Michael Niedermayer
4354788a89 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  tls: Use ERR_get_error() in do_tls_poll
  indeo3: Fix a fencepost error.
  mxfdec: Fix comparison of unsigned expression < 0.
  mpegts: set stream id on just created stream, not an unrelated variable
  ra288: return error if input buffer is too small
  ra288: utilize DSPContext.vector_fmul()
  ra288: use memcpy() to copy decoded samples to output
  mace: only calculate output buffer size once
  Remove redundant filename self-references inside files.
  indeo3data: add missing config.h #include for HAVE_BIGENDIAN
  x86: drop pointless ARCH_X86 #ifdef from files in x86 subdirectory
  avplay: reset rdft when closing stream.
  doc/git-howto: expand format-patch and send-email notes.
  lavf: expand doxy for some AVFormatContext fields.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 02:59:49 +01:00
Michael Niedermayer
d8407ee2b1 ffplay: limit lowres to the maximum supported. Fixes Ticket591
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-11-08 22:34:39 +01:00
Michael Niedermayer
13b7781ec8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  x86inc: use sse versions of common macros instead of sse2 when applicable
  doc/APIchanges: add missing dates and hashes
  lavf: don't return from void av_update_cur_dts()
  Changelog: add more entries.
  Changelog: update ffmpeg/avconv incompatibility list.
  avconv: remove some redundant temporary variables.
  avconv: fix broken indentation
  avconv: move copy_initial_nonkeyframes to the options context.
  avconv: use file:stream instead of file.stream in log messages.
  doc/avconv: elaborate on basic functionality.
  doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
  openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
  Call avformat_network_init/deinit in the programs
  Remove leftover includes of strings.h
  avutil: Don't allow using strcasecmp/strncasecmp
  Replace all usage of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of toupper/tolower
  cosmetics: insert some spaces in explicit enum value assignments
  move 8SVX audio codecs to the audio codec list part on the next bump
  ...

Conflicts:
	avprobe.c
	doc/APIchanges
	ffplay.c
	ffserver.c
	libavcodec/avcodec.h
	libavdevice/bktr.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavformat/matroskaenc.c
	libavformat/wtv.c
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/avutil.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 03:01:43 +01:00
Michael Niedermayer
304ec08f3b ffplay: Avoid useage of deprecated url_fileno().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-11-05 00:25:07 +01:00
Clément Bœsch
f5cd136f2b ffmpeg: add -map_channel option.
Based on an initial work by Baptiste Coudurier.
2011-11-04 19:40:32 +01:00
Michael Niedermayer
df98446ba3 Revert "Remove detection of mmsh protocol in ffplay."
This reverts commit 2f64239338.
2011-10-31 18:04:39 +01:00
Marton Balint
d54af906a4 ffplay: add frame drop statistics
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-24 22:44:47 +02:00
Marton Balint
8f17a8efd6 ffplay: consider estimated time of filter in early frame drop
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-24 22:44:47 +02:00
Marton Balint
223cba6e3a ffplay: reimplement early frame drop
This patch reimplements early frame drop, it is now based on the current
difference between the master clock and the video clock, and the pts of the
current and the last displayed (or skipped) frame.  If the frame to be added to
the queue is late after decoding, then we drop it early because later we would
drop it anyway (unless it is the only frame in the picture queue).

The current approach has only one downside that I know of, it does not handle
well when the filters are changing significantly the pts of the frames, because
we compare pts values from filtered and unfiltered frames.

We also start using the pictq_mutex to ensure consistent video_current_pts,
video_current_pts_drift, frame_last_pts, frame_last_dropped_pts and
frame_last_dropped_pos values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-24 22:44:47 +02:00
Michael Niedermayer
f97faf6751 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  id3v2: fix doxy comment - 'machine byte order' makes no sense on char arrays
  VC1: restore mistakenly removed code
  twinvq: check output buffer size before decoding
  twinvq: return an error when the packet size is too small
  lavf: export some forgotten symbols with non-av prefixes.
  swscale: update altivec yuv2planeX asm to new per-plane API.
  swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware.
  yuv2planeX10 SIMD
  swscale: decide whether to use yuv2plane1/X on a per-plane basis.
  swscale: reintroduce full precision in 16-bit output.
  Split up yuv2yuvX functions
  Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions
  lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition
  lavc: translate non-flag-based er options into flag-based ef options at codec open
  add -err_filter AVOptions to access flag-based error recognition
  h264_weight: initialize "height" function argument properly.
  presets: spelling error in libvpx 1080p50_60
  avplay: fix fullscreen behaviour with SDL 1.2.14 on Mac OS X

Conflicts:
	ffplay.c
	libavformat/libavformat.v
	libswscale/swscale.c
	libswscale/x86/swscale_template.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-23 05:13:56 +02:00
Marton Balint
8085a5b7cd ffplay: reallocate SDL overlays for OSX when changing full screen
Fixes missing blue channel when switching from/to fullscren on OSX and libsdl
1.2.14. Fixes issue 548. Thanks for Jean First for the original patch and
for testing.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-20 23:12:27 +02:00
Jean First
72776adfb9 ffplay: avoid window resize crash on osx with libsdl 1.2.14
Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-16 19:28:22 +02:00
Marton Balint
abb0e4f637 ffplay: add delay multiple times to frame_timer if it is less than current time
If the picture queue is empty, or when the calculated delay is 0, frame_timer
is not increased but we are still displaying the old frame. When we eventually
get a frame, where the computed delay is positive, so we don't need to drop any
more frames, then it is best to update frame_timer to be as near as the current
time as it can.

This way we dont't have to wait several frames to add the necesarry delays to
frame_timer to reach current time, therefore there are no extra frame drops
after reaching a positive delay.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-16 19:21:01 +02:00
Marton Balint
d2d8e1e599 ffplay: remove early frame drop functionality
The current impementation of early frame drops (dropping frames before adding
them to the picture queue) has multiple problems:

Even after gettin A-V sync, the frame droping continues until
VideoState->skip_frames reaches 1, which can take a lot of time causing useless
additional frame drops and bad AV-sync. This issue can be easily triggered with
for example changing the audio stream.

Also video_refresh currenly does not handle early skipped frames in every case,
for example if we skip a frame, then the last frame duration calculation will
compute the duration of the sum of the skipped frame and the duration of the
frame before that, and in compute_target_delay we may multiply this unusually
big delay.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-16 19:21:01 +02:00
Marton Balint
4e268aae55 ffplay: calculate target clock dynamically, make code more readable
Since target clock is based on the current A-V delay, it is better calculate it
when we actually need it rather than when we put a picture in the picture
queue.

The patch also makes a code a bit more readable by renaming some delay
variables to duration, and converting compute_target_time to a delay
calculating function which does not modify the state. Factoring out the
iteration of the pictq to standalone function is also done in this patch.

Signed-off-by: Marton Balint <cus@passwd.hu>
2011-10-16 19:21:01 +02:00
Michael Niedermayer
f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Marton Balint
1dd3c473a2 ffplay: use libswresample instead of av_audio_convert
Previously ffplay expected SDL_AudioOpen to provide the requested sample rate
and channel number. This is no longer a requirement because this patch replaces
the audio convert function with libswresample's swr_convert which is capable of
handling different sample formats, sample rates and different number of
channels and different channel layouts.

The patch also removes the hardcoded 16bit samples assumption and uses
av_get_bytes_per_sample almost everywhere. The only exceptions are
the update_sample_display and video_audio_display functions, it
seemed too much of a headache to make them generic.

We also fix a tiny bug in sdl_audio_callback, we ensure that the number of
bytes when we put silence in the buffer is a multiple of the frame size.
2011-10-02 22:23:11 +02:00
Marton Balint
2446a8cc0a ffplay: use avctx->channels and avctx->freq before avcodec_open2 consistently 2011-10-02 21:21:46 +02:00
Marton Balint
1e7f7dc2d1 ffplay: remove now unnecessary request_channels, we set it now with options 2011-10-02 21:21:46 +02:00
Michael Niedermayer
92dac3a9dd ffplay: set request_channels to 2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 21:21:46 +02:00