summaryrefslogtreecommitdiff
path: root/libavformat/dvenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-18 15:10:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-18 15:20:32 +0200
commit6c180b35c43f0738d8a3d5c08a01209b51eda569 (patch)
treeb278223305ed9dc4af792f53a376a558ad9155ee /libavformat/dvenc.c
parent69fc2489c4059886fcda2de91029b43447330951 (diff)
parent7f9aaa499b8a5ce066cc17aac6ebbdf0111980b6 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpegvideo_enc: don't use deprecated avcodec_encode_video(). cmdutils: refactor -codecs option. avconv: make -shortest a per-output file option. lavc: add avcodec_descriptor_get_by_name(). lavc: add const to AVCodec* function parameters. swf(dec): replace CODEC_ID with AV_CODEC_ID dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE rtmpdh: Do not generate the same private key every time when using libnettle rtp: remove ff_rtp_get_rtcp_file_handle(). rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle() avio: add (ff)url_get_multi_file_handle() for getting more than one fd h264: vdpau: fix crash with unsupported colorspace amrwbdec: Decode the fr_quality bit properly Conflicts: Changelog cmdutils.c cmdutils_common_opts.h doc/ffmpeg.texi ffmpeg.c ffmpeg.h ffmpeg_opt.c libavcodec/h264.c libavcodec/options.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dvenc.c')
-rw-r--r--libavformat/dvenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 518ae70ccc..604f4ce833 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -41,6 +41,8 @@
#include "libavutil/opt.h"
#include "libavutil/timecode.h"
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
+
struct DVMuxContext {
AVClass *av_class;
const DVprofile* sys; /* current DV profile, e.g.: 525/60, 625/50 */
@@ -241,7 +243,7 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
for (i = 0; i < c->n_ast && st != c->ast[i]; i++);
/* FIXME: we have to have more sensible approach than this one */
- if (av_fifo_size(c->audio_data[i]) + data_size >= 100*AVCODEC_MAX_AUDIO_FRAME_SIZE)
+ if (av_fifo_size(c->audio_data[i]) + data_size >= 100*MAX_AUDIO_FRAME_SIZE)
av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient video data or severe sync problem.\n", c->frames);
av_fifo_generic_write(c->audio_data[i], data, data_size, NULL);
@@ -329,7 +331,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
c->start_time = ff_iso8601_to_unix_time(t->value);
for (i=0; i < c->n_ast; i++) {
- if (c->ast[i] && !(c->audio_data[i]=av_fifo_alloc(100*AVCODEC_MAX_AUDIO_FRAME_SIZE))) {
+ if (c->ast[i] && !(c->audio_data[i]=av_fifo_alloc(100*MAX_AUDIO_FRAME_SIZE))) {
while (i > 0) {
i--;
av_fifo_free(c->audio_data[i]);