]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/yop.c
flvenc: Don't pretend to support muxing "plain" VP6
[ffmpeg] / libavformat / yop.c
index 51d088bdd26808a6d9e0e09b1593c03126a931ca..8caeb07157c14d45cc65278208297d74c40b2115 100644 (file)
@@ -22,6 +22,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "internal.h"
@@ -74,6 +75,7 @@ static int yop_read_header(AVFormatContext *s)
     audio_dec->codec_type   = AVMEDIA_TYPE_AUDIO;
     audio_dec->codec_id     = AV_CODEC_ID_ADPCM_IMA_APC;
     audio_dec->channels     = 1;
+    audio_dec->channel_layout = AV_CH_LAYOUT_MONO;
     audio_dec->sample_rate  = 22050;
 
     // Video
@@ -125,6 +127,12 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
     if (yop->video_packet.data) {
         *pkt                   =  yop->video_packet;
         yop->video_packet.data =  NULL;
+        yop->video_packet.buf  =  NULL;
+#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
+        yop->video_packet.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
         yop->video_packet.size =  0;
         pkt->data[0]           =  yop->odd_frame;
         pkt->flags             |= AV_PKT_FLAG_KEY;