[FFmpeg-devel] [PATCH 4/4] lavf/matroskaenc: don't try to end the segment when the output isn't seekable

Michael Niedermayer michaelni at gmx.at
Sun Mar 29 19:29:01 CEST 2015


On Sat, Mar 28, 2015 at 07:25:21PM -0600, Rodger Combs wrote:
> ---
>  libavformat/matroskaenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 6b2e390..c242a0e 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1948,9 +1948,9 @@ static int mkv_write_trailer(AVFormatContext *s)
>          put_ebml_float(pb, MATROSKA_ID_DURATION, mkv->duration);
>  
>          avio_seek(pb, currentpos, SEEK_SET);
> +        end_ebml_master(pb, mkv->segment);
>      }
>  
> -    end_ebml_master(pb, mkv->segment);

the change should be ok but
why exactly does this fail ?

if the output isnt seekable avio_seek() would fail and end_ebml_master
would return with just the failed seek.
why does this cause a problem ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150329/c2f01e62/attachment.asc>


More information about the ffmpeg-devel mailing list