On 11/11/2011 05:35 AM, Janne Grunau wrote:

> On Fri, Oct 21, 2011 at 05:25:27PM -0400, Justin Ruggles wrote:
>> fixes seeking in audio-only files
>> ---
>>  libavformat/flvdec.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
>> index 395c8f8..e1097f5 100644
>> --- a/libavformat/flvdec.c
>> +++ b/libavformat/flvdec.c
>> @@ -478,7 +478,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket 
>> *pkt)
>>          avio_seek(s->pb, next, SEEK_SET);
>>          continue;
>>      }
>> -    if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)
>> +    if (is_audio || (flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)
>>          av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME);
>>      break;
>>   }
> 
> how large are audio packets typically? Having every audio packet in the
> index is not really desireable especially since adding entries to an
> index with an unkown size is inefficient.


yeah, i've been rethinking this one. we should probably only add audio
packets to the index if there is no video stream. and yeah, maybe not
every packet is necessary. they can be quite small. maybe we could add
one every half second?

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to