summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2013-02-18 00:56:01 +0100
committerMichael Niedermayer <[email protected]>2013-02-18 00:56:01 +0100
commit7378101d41020ee9f4643740ebf1b9142afca557 (patch)
treed23ff231538f8385182a4138a2d874fbc72fa378 /ffmpeg.c
parentda5f4e4d19917bce4b9213ff3d433ddf30e22fe5 (diff)
parent377fabc9e687a3c73fdb235f773f6e9151378ca5 (diff)
Merge branch 'release/0.8' into release/0.7
* release/0.8: (92 commits) Update for 0.8.13 pngdec/filter: dont access out of array elements at the end aacdec: check channel count vqavideo: check chunk sizes before reading chunks eamad: fix out of array accesses roqvideodec: check dimensions validity qdm2: check array index before use, fix out of array accesses alsdec: check block length huffyuvdec: Skip len==0 cases huffyuvdec: Check init_vlc() return codes. Update changelog for 0.7.7 release mpeg12: do not decode extradata more than once. indeo4/5: check empty tile size in decode_mb_info(). dfa: improve boundary checks in decode_dds1() indeo5dec: Make sure we have had a valid gop header. rv34: error out on size changes with frame threading rtmp: fix buffer overflows in ff_amf_tag_contents() rtmp: fix multiple broken overflow checks Revert "h264: allow cropping to AVCodecContext.width/height" h264: check ref_count validity for num_ref_idx_active_override_flag ... Conflicts: Doxyfile RELEASE VERSION libavcodec/rv34.c Merged-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a913485a7b..867ac75d17 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -315,6 +315,7 @@ typedef struct AVOutputStream {
#endif
int sws_flags;
+ char *forced_key_frames;
} AVOutputStream;
static AVOutputStream **output_streams_for_file[MAX_FILES] = { NULL };
@@ -2337,6 +2338,9 @@ static int transcode(AVFormatContext **output_files,
"Please consider specifiying a lower framerate, a different muxer or -vsync 2\n");
}
+ if (ost->forced_key_frames)
+ parse_forced_key_frames(ost->forced_key_frames, ost, codec);
+
#if CONFIG_AVFILTER
if (configure_video_filters(ist, ost)) {
fprintf(stderr, "Error opening filters!\n");
@@ -2858,6 +2862,7 @@ static int transcode(AVFormatContext **output_files,
av_freep(&ost->st->codec->subtitle_header);
av_free(ost->resample_frame.data[0]);
av_free(ost->forced_kf_pts);
+ av_free(ost->forced_key_frames);
if (ost->video_resample)
sws_freeContext(ost->img_resample_ctx);
if (ost->resample)
@@ -3656,8 +3661,10 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
}
}
- if (forced_key_frames)
- parse_forced_key_frames(forced_key_frames, ost, video_enc);
+ if (forced_key_frames) {
+ ost->forced_key_frames = forced_key_frames;
+ forced_key_frames = NULL;
+ }
}
if (video_language) {
av_dict_set(&st->metadata, "language", video_language, 0);
@@ -3667,7 +3674,6 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
/* reset some key parameters */
video_disable = 0;
av_freep(&video_codec_name);
- av_freep(&forced_key_frames);
video_stream_copy = 0;
frame_pix_fmt = PIX_FMT_NONE;
}