Browse code

Merge commit '2eba9087f3031c6050f8dcd996225490be6c2410'

* commit '2eba9087f3031c6050f8dcd996225490be6c2410':
lavc: make up a fake frame channel layout when there is no real one.

Conflicts:
libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/03/12 20:41:16
Showing 9 changed files
... ...
@@ -134,7 +134,7 @@ unsigned int avpriv_toupper4(unsigned int x);
134 134
 /**
135 135
  * does needed setup of pkt_pts/pos and such for (re)get_buffer();
136 136
  */
137
-void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
137
+int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
138 138
 
139 139
 
140 140
 void avpriv_color_frame(AVFrame *frame, const int color[4]);
... ...
@@ -597,7 +597,7 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags
597 597
     }
598 598
 }
599 599
 
600
-void ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
600
+int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
601 601
 {
602 602
     if (avctx->pkt) {
603 603
         frame->pkt_pts = avctx->pkt->pts;
... ...
@@ -628,11 +628,32 @@ void ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
628 628
             frame->sample_rate    = avctx->sample_rate;
629 629
         if (frame->format < 0)
630 630
             frame->format         = avctx->sample_fmt;
631
-        if (!frame->channel_layout)
632
-            frame->channel_layout = avctx->channel_layout;
631
+        if (!frame->channel_layout) {
632
+            if (avctx->channel_layout) {
633
+                 if (av_get_channel_layout_nb_channels(avctx->channel_layout) !=
634
+                     avctx->channels) {
635
+                     av_log(avctx, AV_LOG_ERROR, "Inconsistent channel "
636
+                            "configuration.\n");
637
+                     return AVERROR(EINVAL);
638
+                 }
639
+
640
+                frame->channel_layout = avctx->channel_layout;
641
+            } else {
642
+                if (avctx->channels > FF_SANE_NB_CHANNELS) {
643
+                    av_log(avctx, AV_LOG_ERROR, "Too many channels: %d.\n",
644
+                           avctx->channels);
645
+                    return AVERROR(ENOSYS);
646
+                }
647
+
648
+                frame->channel_layout = av_get_default_channel_layout(avctx->channels);
649
+                if (!frame->channel_layout)
650
+                    frame->channel_layout = (1ULL << avctx->channels) - 1;
651
+            }
652
+        }
633 653
         av_frame_set_channels(frame, avctx->channels);
634 654
         break;
635 655
     }
656
+    return 0;
636 657
 }
637 658
 
638 659
 #if FF_API_GET_BUFFER
... ...
@@ -670,7 +691,8 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
670 670
             return AVERROR(EINVAL);
671 671
         }
672 672
     }
673
-    ff_init_buffer_info(avctx, frame);
673
+    if ((ret = ff_init_buffer_info(avctx, frame)) < 0)
674
+        return ret;
674 675
 
675 676
 #if FF_API_GET_BUFFER
676 677
     /*
... ...
@@ -1,27 +1,27 @@
1 1
 packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=572|flags=K
2
-frame|media_type=audio|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=572|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
2
+frame|media_type=audio|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=572|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
3 3
 packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=2647|flags=K
4 4
 frame|media_type=video|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2647|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
5 5
 packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=233068|flags=K
6 6
 frame|media_type=video|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233068|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
7 7
 packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=263073|flags=K
8
-frame|media_type=audio|key_frame=1|pkt_pts=1024|pkt_pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263073|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
8
+frame|media_type=audio|key_frame=1|pkt_pts=1024|pkt_pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263073|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
9 9
 packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=265151|flags=K
10 10
 frame|media_type=video|key_frame=1|pkt_pts=2048|pkt_pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265151|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
11 11
 packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=495575|flags=K
12 12
 frame|media_type=video|key_frame=1|pkt_pts=2048|pkt_pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495575|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
13 13
 packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=525580|flags=K
14
-frame|media_type=audio|key_frame=1|pkt_pts=2048|pkt_pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525580|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
14
+frame|media_type=audio|key_frame=1|pkt_pts=2048|pkt_pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525580|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
15 15
 packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=527651|flags=K
16
-frame|media_type=audio|key_frame=1|pkt_pts=3072|pkt_pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527651|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
16
+frame|media_type=audio|key_frame=1|pkt_pts=3072|pkt_pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527651|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
17 17
 packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=529729|flags=K
18 18
 frame|media_type=video|key_frame=1|pkt_pts=4096|pkt_pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529729|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
19 19
 packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=760153|flags=K
20 20
 frame|media_type=video|key_frame=1|pkt_pts=4096|pkt_pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760153|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
21 21
 packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=790158|flags=K
22
-frame|media_type=audio|key_frame=1|pkt_pts=4096|pkt_pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790158|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
22
+frame|media_type=audio|key_frame=1|pkt_pts=4096|pkt_pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790158|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
23 23
 packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=792229|flags=K
24
-frame|media_type=audio|key_frame=1|pkt_pts=5120|pkt_pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=792229|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
24
+frame|media_type=audio|key_frame=1|pkt_pts=5120|pkt_pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=792229|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
25 25
 packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=794307|flags=K
26 26
 frame|media_type=video|key_frame=1|pkt_pts=6144|pkt_pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=794307|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
27 27
 packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=1024731|flags=K
... ...
@@ -1,27 +1,27 @@
1 1
 packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,N/A,N/A,2048,572,K
2
-frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,572,2048,s16,1024,1,unknown
2
+frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,572,2048,s16,1024,1,mono
3 3
 packet,video,1,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,230400,2647,K
4 4
 frame,video,1,0,0.000000,0,0.000000,2048,0.040000,2647,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
5 5
 packet,video,2,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,30000,233068,K
6 6
 frame,video,1,0,0.000000,0,0.000000,2048,0.040000,233068,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
7 7
 packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,N/A,N/A,2048,263073,K
8
-frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,263073,2048,s16,1024,1,unknown
8
+frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,263073,2048,s16,1024,1,mono
9 9
 packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,230400,265151,K
10 10
 frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,265151,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
11 11
 packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,30000,495575,K
12 12
 frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,495575,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
13 13
 packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,N/A,N/A,2048,525580,K
14
-frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525580,2048,s16,1024,1,unknown
14
+frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525580,2048,s16,1024,1,mono
15 15
 packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,N/A,N/A,2048,527651,K
16
-frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527651,2048,s16,1024,1,unknown
16
+frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527651,2048,s16,1024,1,mono
17 17
 packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,230400,529729,K
18 18
 frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,529729,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
19 19
 packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,30000,760153,K
20 20
 frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,760153,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
21 21
 packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,N/A,N/A,2048,790158,K
22
-frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790158,2048,s16,1024,1,unknown
22
+frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790158,2048,s16,1024,1,mono
23 23
 packet,audio,0,5120,0.116100,5120,0.116100,1024,0.023220,N/A,N/A,2048,792229,K
24
-frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792229,2048,s16,1024,1,unknown
24
+frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792229,2048,s16,1024,1,mono
25 25
 packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,230400,794307,K
26 26
 frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,794307,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
27 27
 packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,30000,1024731,K
... ...
@@ -27,7 +27,7 @@ pkt_size=2048
27 27
 sample_fmt=s16
28 28
 nb_samples=1024
29 29
 channels=1
30
-channel_layout=unknown
30
+channel_layout=mono
31 31
 [/FRAME]
32 32
 [PACKET]
33 33
 codec_type=video
... ...
@@ -134,7 +134,7 @@ pkt_size=2048
134 134
 sample_fmt=s16
135 135
 nb_samples=1024
136 136
 channels=1
137
-channel_layout=unknown
137
+channel_layout=mono
138 138
 [/FRAME]
139 139
 [PACKET]
140 140
 codec_type=video
... ...
@@ -241,7 +241,7 @@ pkt_size=2048
241 241
 sample_fmt=s16
242 242
 nb_samples=1024
243 243
 channels=1
244
-channel_layout=unknown
244
+channel_layout=mono
245 245
 [/FRAME]
246 246
 [PACKET]
247 247
 codec_type=audio
... ...
@@ -272,7 +272,7 @@ pkt_size=2048
272 272
 sample_fmt=s16
273 273
 nb_samples=1024
274 274
 channels=1
275
-channel_layout=unknown
275
+channel_layout=mono
276 276
 [/FRAME]
277 277
 [PACKET]
278 278
 codec_type=video
... ...
@@ -379,7 +379,7 @@ pkt_size=2048
379 379
 sample_fmt=s16
380 380
 nb_samples=1024
381 381
 channels=1
382
-channel_layout=unknown
382
+channel_layout=mono
383 383
 [/FRAME]
384 384
 [PACKET]
385 385
 codec_type=audio
... ...
@@ -410,7 +410,7 @@ pkt_size=2048
410 410
 sample_fmt=s16
411 411
 nb_samples=1024
412 412
 channels=1
413
-channel_layout=unknown
413
+channel_layout=mono
414 414
 [/FRAME]
415 415
 [PACKET]
416 416
 codec_type=video
... ...
@@ -24,7 +24,7 @@ packets_and_frames.frame.0.pkt_size="2048"
24 24
 packets_and_frames.frame.0.sample_fmt="s16"
25 25
 packets_and_frames.frame.0.nb_samples=1024
26 26
 packets_and_frames.frame.0.channels=1
27
-packets_and_frames.frame.0.channel_layout="unknown"
27
+packets_and_frames.frame.0.channel_layout="mono"
28 28
 packets_and_frames.packet.1.codec_type="video"
29 29
 packets_and_frames.packet.1.stream_index=1
30 30
 packets_and_frames.packet.1.pts=0
... ...
@@ -119,7 +119,7 @@ packets_and_frames.frame.3.pkt_size="2048"
119 119
 packets_and_frames.frame.3.sample_fmt="s16"
120 120
 packets_and_frames.frame.3.nb_samples=1024
121 121
 packets_and_frames.frame.3.channels=1
122
-packets_and_frames.frame.3.channel_layout="unknown"
122
+packets_and_frames.frame.3.channel_layout="mono"
123 123
 packets_and_frames.packet.4.codec_type="video"
124 124
 packets_and_frames.packet.4.stream_index=1
125 125
 packets_and_frames.packet.4.pts=2048
... ...
@@ -214,7 +214,7 @@ packets_and_frames.frame.6.pkt_size="2048"
214 214
 packets_and_frames.frame.6.sample_fmt="s16"
215 215
 packets_and_frames.frame.6.nb_samples=1024
216 216
 packets_and_frames.frame.6.channels=1
217
-packets_and_frames.frame.6.channel_layout="unknown"
217
+packets_and_frames.frame.6.channel_layout="mono"
218 218
 packets_and_frames.packet.7.codec_type="audio"
219 219
 packets_and_frames.packet.7.stream_index=0
220 220
 packets_and_frames.packet.7.pts=3072
... ...
@@ -241,7 +241,7 @@ packets_and_frames.frame.7.pkt_size="2048"
241 241
 packets_and_frames.frame.7.sample_fmt="s16"
242 242
 packets_and_frames.frame.7.nb_samples=1024
243 243
 packets_and_frames.frame.7.channels=1
244
-packets_and_frames.frame.7.channel_layout="unknown"
244
+packets_and_frames.frame.7.channel_layout="mono"
245 245
 packets_and_frames.packet.8.codec_type="video"
246 246
 packets_and_frames.packet.8.stream_index=1
247 247
 packets_and_frames.packet.8.pts=4096
... ...
@@ -336,7 +336,7 @@ packets_and_frames.frame.10.pkt_size="2048"
336 336
 packets_and_frames.frame.10.sample_fmt="s16"
337 337
 packets_and_frames.frame.10.nb_samples=1024
338 338
 packets_and_frames.frame.10.channels=1
339
-packets_and_frames.frame.10.channel_layout="unknown"
339
+packets_and_frames.frame.10.channel_layout="mono"
340 340
 packets_and_frames.packet.11.codec_type="audio"
341 341
 packets_and_frames.packet.11.stream_index=0
342 342
 packets_and_frames.packet.11.pts=5120
... ...
@@ -363,7 +363,7 @@ packets_and_frames.frame.11.pkt_size="2048"
363 363
 packets_and_frames.frame.11.sample_fmt="s16"
364 364
 packets_and_frames.frame.11.nb_samples=1024
365 365
 packets_and_frames.frame.11.channels=1
366
-packets_and_frames.frame.11.channel_layout="unknown"
366
+packets_and_frames.frame.11.channel_layout="mono"
367 367
 packets_and_frames.packet.12.codec_type="video"
368 368
 packets_and_frames.packet.12.stream_index=1
369 369
 packets_and_frames.packet.12.pts=6144
... ...
@@ -29,7 +29,7 @@ pkt_size=2048
29 29
 sample_fmt=s16
30 30
 nb_samples=1024
31 31
 channels=1
32
-channel_layout=unknown
32
+channel_layout=mono
33 33
 
34 34
 [packets_and_frames.packet.1]
35 35
 codec_type=video
... ...
@@ -136,7 +136,7 @@ pkt_size=2048
136 136
 sample_fmt=s16
137 137
 nb_samples=1024
138 138
 channels=1
139
-channel_layout=unknown
139
+channel_layout=mono
140 140
 
141 141
 [packets_and_frames.packet.4]
142 142
 codec_type=video
... ...
@@ -243,7 +243,7 @@ pkt_size=2048
243 243
 sample_fmt=s16
244 244
 nb_samples=1024
245 245
 channels=1
246
-channel_layout=unknown
246
+channel_layout=mono
247 247
 
248 248
 [packets_and_frames.packet.7]
249 249
 codec_type=audio
... ...
@@ -274,7 +274,7 @@ pkt_size=2048
274 274
 sample_fmt=s16
275 275
 nb_samples=1024
276 276
 channels=1
277
-channel_layout=unknown
277
+channel_layout=mono
278 278
 
279 279
 [packets_and_frames.packet.8]
280 280
 codec_type=video
... ...
@@ -381,7 +381,7 @@ pkt_size=2048
381 381
 sample_fmt=s16
382 382
 nb_samples=1024
383 383
 channels=1
384
-channel_layout=unknown
384
+channel_layout=mono
385 385
 
386 386
 [packets_and_frames.packet.11]
387 387
 codec_type=audio
... ...
@@ -412,7 +412,7 @@ pkt_size=2048
412 412
 sample_fmt=s16
413 413
 nb_samples=1024
414 414
 channels=1
415
-channel_layout=unknown
415
+channel_layout=mono
416 416
 
417 417
 [packets_and_frames.packet.12]
418 418
 codec_type=video
... ...
@@ -28,7 +28,8 @@
28 28
             "pkt_size": "2048",
29 29
             "sample_fmt": "s16",
30 30
             "nb_samples": 1024,
31
-            "channels": 1
31
+            "channels": 1,
32
+            "channel_layout": "mono"
32 33
         },
33 34
         {
34 35
             "type": "packet",
... ...
@@ -132,7 +133,8 @@
132 132
             "pkt_size": "2048",
133 133
             "sample_fmt": "s16",
134 134
             "nb_samples": 1024,
135
-            "channels": 1
135
+            "channels": 1,
136
+            "channel_layout": "mono"
136 137
         },
137 138
         {
138 139
             "type": "packet",
... ...
@@ -236,7 +238,8 @@
236 236
             "pkt_size": "2048",
237 237
             "sample_fmt": "s16",
238 238
             "nb_samples": 1024,
239
-            "channels": 1
239
+            "channels": 1,
240
+            "channel_layout": "mono"
240 241
         },
241 242
         {
242 243
             "type": "packet",
... ...
@@ -266,7 +269,8 @@
266 266
             "pkt_size": "2048",
267 267
             "sample_fmt": "s16",
268 268
             "nb_samples": 1024,
269
-            "channels": 1
269
+            "channels": 1,
270
+            "channel_layout": "mono"
270 271
         },
271 272
         {
272 273
             "type": "packet",
... ...
@@ -370,7 +374,8 @@
370 370
             "pkt_size": "2048",
371 371
             "sample_fmt": "s16",
372 372
             "nb_samples": 1024,
373
-            "channels": 1
373
+            "channels": 1,
374
+            "channel_layout": "mono"
374 375
         },
375 376
         {
376 377
             "type": "packet",
... ...
@@ -400,7 +405,8 @@
400 400
             "pkt_size": "2048",
401 401
             "sample_fmt": "s16",
402 402
             "nb_samples": 1024,
403
-            "channels": 1
403
+            "channels": 1,
404
+            "channel_layout": "mono"
404 405
         },
405 406
         {
406 407
             "type": "packet",
... ...
@@ -2,29 +2,29 @@
2 2
 <ffprobe>
3 3
     <packets_and_frames>
4 4
         <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="572" flags="K"/>
5
-        <frame media_type="audio" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="572" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
5
+        <frame media_type="audio" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="572" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
6 6
         <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2647" flags="K"/>
7 7
         <frame media_type="video" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2647" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
8 8
         <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233068" flags="K"/>
9 9
         <frame media_type="video" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233068" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
10 10
         <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263073" flags="K"/>
11
-        <frame media_type="audio" key_frame="1" pkt_pts="1024" pkt_pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263073" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
11
+        <frame media_type="audio" key_frame="1" pkt_pts="1024" pkt_pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263073" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
12 12
         <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265151" flags="K"/>
13 13
         <frame media_type="video" key_frame="1" pkt_pts="2048" pkt_pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265151" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
14 14
         <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495575" flags="K"/>
15 15
         <frame media_type="video" key_frame="1" pkt_pts="2048" pkt_pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495575" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
16 16
         <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525580" flags="K"/>
17
-        <frame media_type="audio" key_frame="1" pkt_pts="2048" pkt_pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525580" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
17
+        <frame media_type="audio" key_frame="1" pkt_pts="2048" pkt_pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525580" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
18 18
         <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527651" flags="K"/>
19
-        <frame media_type="audio" key_frame="1" pkt_pts="3072" pkt_pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527651" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
19
+        <frame media_type="audio" key_frame="1" pkt_pts="3072" pkt_pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527651" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
20 20
         <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529729" flags="K"/>
21 21
         <frame media_type="video" key_frame="1" pkt_pts="4096" pkt_pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529729" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
22 22
         <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760153" flags="K"/>
23 23
         <frame media_type="video" key_frame="1" pkt_pts="4096" pkt_pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760153" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
24 24
         <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790158" flags="K"/>
25
-        <frame media_type="audio" key_frame="1" pkt_pts="4096" pkt_pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790158" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
25
+        <frame media_type="audio" key_frame="1" pkt_pts="4096" pkt_pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790158" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
26 26
         <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="1024" duration_time="0.023220" size="2048" pos="792229" flags="K"/>
27
-        <frame media_type="audio" key_frame="1" pkt_pts="5120" pkt_pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="792229" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
27
+        <frame media_type="audio" key_frame="1" pkt_pts="5120" pkt_pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="792229" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
28 28
         <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="794307" flags="K"/>
29 29
         <frame media_type="video" key_frame="1" pkt_pts="6144" pkt_pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="794307" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
30 30
         <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1024731" flags="K"/>