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.

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

Reply via email to