[FFmpeg-devel] [PATCH] Seeking and resync support in nuv demuxer
elupus
elupus
Wed May 28 02:10:24 CEST 2008
On Sat, 24 May 2008 21:53:35 +0200, Michael Niedermayer wrote:
> On Sat, May 24, 2008 at 01:28:42PM +0200, elupus wrote:
>
> [...]
>> Index: nuv.c
>> ===================================================================
>> --- nuv.c (revision 12279)
>> +++ nuv.c (working copy)
>> @@ -209,9 +209,14 @@
>> ret = av_new_packet(pkt, copyhdrsize + size);
>> if (ret < 0)
>> return ret;
>> - pkt->pos = url_ftell(pb) - copyhdrsize;
>> + pkt->pos = url_ftell(pb) - HDRSIZE;
>> pkt->pts = AV_RL32(&hdr[4]);
>> pkt->stream_index = ctx->v_id;
>> + if(hdr[2] == 0) {
>> + AVStream *st = s->streams[pkt->stream_index];
>> + pkt->flags |= PKT_FLAG_KEY;
>> + av_add_index_entry(st, pkt->pos, pkt->pts, size + HDRSIZE, 0, AVINDEX_KEYFRAME);
>> + }
>> memcpy(pkt->data, hdr, copyhdrsize);
>> ret = get_buffer(pb, pkt->data + copyhdrsize, size);
>> return ret;
>
> The change to pkt->pos should also be in a seperate patch :)
> besides the indention i already mentioned ...
Damn you, I was hoping you wouldn't spot that :). Horrible todo in svn
without having some system for stackable commits. Might resend that when I
get a git repo setup instead.
>
>> + if ((frametype == NUV_VIDEO && stream_index == ctx->v_id) ||
>> + (frametype == NUV_VIDEO && stream_index == ctx->a_id)) {
>
> are both supposed to be VIDEO ?
Heh. no.
>> + url_fskip(pb, size);
>> + break;
>> + case NUV_SEEKP:
>> + break;
>> + default:
>> + url_fskip(pb, size);
>> + break;
>
> duplicate
Fixed
>
>> + }
>> + }
>
>> + return AV_NOPTS_VALUE;
>> +
>> +
>> +}
>
> are the empty lines intended?
>
Rremoved.
Joakim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nuv_timestamp.patch
Type: text/x-patch
Size: 2897 bytes
Desc: Attached file: nuv_timestamp.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080528/0c320c47/attachment.bin>
More information about the ffmpeg-devel
mailing list