On 01/25/2012 05:37 AM, Martin Storsjö wrote:

> The field frame_size isn't written to the output anywhere except
> than in mov.
> 
> This facilitates stream copy from formats that don't set frame_size.
> ---
>  libavformat/movenc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 95d92aa..dc0c040 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -2757,7 +2757,7 @@ static int mov_write_header(AVFormatContext *s)
>              }
>              /* set audio_vbr for compressed audio */
>              if (av_get_bits_per_sample(st->codec->codec_id) < 8) {
> -                if (!st->codec->frame_size) {
> +                if (!st->codec->frame_size && track->mode == MODE_MOV) {
>                      av_log(s, AV_LOG_ERROR, "track %d: codec frame size is 
> not set\n", i);
>                      goto error;
>                  }


Definitely ok. I hope we can remove the requirement for mov as well at
some point, but that might not be possible.

-Justin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to