[FFmpeg-devel] [PATCH] Re: movenc.c: Allow MPEG2.mov playable under QuickTime Player
Måns Rullgård
mans
Sun Feb 13 00:00:44 CET 2011
Takashi Mochizuki <mochi at da2.so-net.ne.jp> writes:
>>Thanks, could you please split the patch and just have this one hunk.
>>It can be applied right now.
>
> OK. Here it is.
>
>
> diff -ur 27576.org/libavformat/movenc.c 27576/libavformat/movenc.c
> --- 27576.org/libavformat/movenc.c 2011-02-10 06:00:41.000000000 +0900
> +++ 27576/libavformat/movenc.c 2011-02-11 15:05:39.000000000 +0900
> @@ -1981,7 +1981,8 @@
> trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
> trk->cluster[trk->entry].flags = 0;
> if (pkt->flags & AV_PKT_FLAG_KEY) {
> - if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO) {
> + if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO &&
> + trk->entry > 0) { // force sync sample for the first key frame
> mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);
> if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)
> trk->flags |= MOV_TRACK_STPS;
>
If I had a git-formatted patch with a proper comment I could apply it...
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list