On Fri, Dec 02, 2011 at 06:11:06PM +0000, Mans Rullgard wrote:
> This restores the old behaviour when only decoding while allowing
> use of the null muxer with encoded streams as well.
> 
> Signed-off-by: Mans Rullgard <[email protected]>

please mention 035af998ad03020a3dda4e662dfb97c68bbabaaa in the commit
message.

> ---
>  avconv.c              |    5 +++--
>  libavformat/nullenc.c |    2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/avconv.c b/avconv.c
> index d6045b7..8842b24 100644
> --- a/avconv.c
> +++ b/avconv.c
> @@ -1207,7 +1207,8 @@ static void do_video_out(AVFormatContext *s,
>          av_init_packet(&pkt);
>          pkt.stream_index= ost->index;
>  
> -        if (s->oformat->flags & AVFMT_RAWPICTURE) {
> +        if (s->oformat->flags & AVFMT_RAWPICTURE &&
> +            enc->codec->id == CODEC_ID_RAWVIDEO) {
>              /* raw pictures are written as AVPicture structure to
>                 avoid any copies. We support temporarily the older
>                 method. */
> @@ -1459,7 +1460,7 @@ static void flush_encoders(OutputStream *ost_table, int 
> nb_ostreams)
>  
>          if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && 
> enc->frame_size <=1)
>              continue;
> -        if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && 
> (os->oformat->flags & AVFMT_RAWPICTURE))
> +        if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && 
> (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == 
> CODEC_ID_RAWVIDEO)
>              continue;
>  
>          for(;;) {
> diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c
> index 680b29c..9849f46 100644
> --- a/libavformat/nullenc.c
> +++ b/libavformat/nullenc.c
> @@ -32,5 +32,5 @@ AVOutputFormat ff_null_muxer = {
>      .audio_codec       = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
>      .video_codec       = CODEC_ID_RAWVIDEO,
>      .write_packet      = null_write_packet,
> -    .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS,
> +    .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS | AVFMT_RAWPICTURE,
>  };

ok

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

Reply via email to