UGeorge <[email protected]> added the comment:
did u want me to run this as is "run -nodropframe -nostats -an hd-test.ts"
Since my lines are outta sync, I went up the stack and listed each
reference to show where it was called.
There are actually 2 calls: the first one goes through without any issues:
But the second set, which looks just like the first:
> Default(3): b3851020
> Malloc (80):8f6c530 for libavfilter/avfilte...@49 P(1) 0B f=0/0
> APC(0):dst(b36d1000,1024),src(b4be4a30,1952),bw:1920,h:1080;;;;
> APC(1):dst(b3811000,512),src(b4df59e8,976),bw:960,h:540;;;;=0/0
> *** glibc detected *** /home/gat/MPLAYER/git/ffmpeg.0/ffplay_g: free():
> invalid pointer: 0xb3851020 ***
> ======= Backtrace: ========== 0KB vq= 3660KB sq= 0B f=0/0
SO:
first call to ff_img...:
> (gdb) bt
> #0 ff_img_copy_plane (dst=0xb3b74000 "", dst_wrap=1024,
> src=0xb44e4a30
> "@@@@73*&////,08<iihhhg...@de?<62>92100;DABB@>>ADHJJJIE=9333317CIAABCCDEE?77???>>=<<;;7.*!#'))#'19;?@@?...@?;9:<@AAA@@?=:85,%())))(.;ACCBBBAAAB95:AA@@??>>50&\")//)5;HNJJKLLMNNEAJUSSSSRPMK=89@><DN]_ceeeee"...,
> src_wrap=1952,
> width=1920, height=1080) at libavcodec/imgconvert.c:905
> #1 0x08216e0a in av_picture_copy (dst=0xb66ff15c, src=0xb66ff190,
> pix_fmt=PIX_FMT_YUV420P, width=1920, height=1080)
> at libavcodec/imgconvert.c:986
> #2 0x0804f2e7 in queue_picture (is=0xb7238020, src_frame=0x8bd6ac0,
> pts=0.47773333333333334, pos=-1) at ffplay.c:1434
> #3 0x0804f53c in output_picture2 (is=0xb7238020, src_frame=0x8bd6ac0,
> pts1=0.47773333333333334, pos=-1) at ffplay.c:1501
> #4 0x0805074f in video_thread (arg=0xb7238020) at ffplay.c:1888
> #5 0x005d8aff in ?? () from /usr/lib/libSDL-1.2.so.0
> #6 0x00623d7e in ?? () from /usr/lib/libSDL-1.2.so.0
> #7 0x00836ab5 in start_thread () from /lib/libpthread.so.0
> #8 0x0052283e in clone () from /lib/libc.so.6
> (gdb) n
> 906 if((!dst) || (!src))
> (gdb) n
> 909 memcpy(dst, src, width);
> (gdb) n
> 9101.97 CHECK_AV_SEARCH_DEFAULT();aq= 0KB vq= 3770KB sq= 0B f=0/0
> (gdb) up
> #1 0x08216e0a in av_picture_copy (dst=0xb66ff15c, src=0xb66ff190,
> pix_fmt=PIX_FMT_YUV420P, width=1920, height=1080)
> at libavcodec/imgconvert.c:986
> 986 ff_img_copy_plane(dst->data[i], dst->linesize[i],
> (gdb) l
> 981 if (i == 1 || i == 2) {
> 982 h= -((-height)>>desc->log2_chroma_h);
> 983 }
> 984 av_log(NULL,
> AV_LOG_INFO,"APC(%d):dst(%x,%d),src(%x,%d),bw:%d,h:%d;;;;\n",i,
> 985 dst->data[i], dst->linesize[i], src->data[i],
> src->linesize[i], bwidth, h);
> 986 ff_img_copy_plane(dst->data[i], dst->linesize[i],
> 987 src->data[i], src->linesize[i],
> 988 bwidth, h);
> 989 CHECK_AV_SEARCH_DEFAULT();
> 990 }
> (gdb) up
> #2 0x0804f2e7 in queue_picture (is=0xb7238020, src_frame=0x8bd6ac0,
> pts=0.47773333333333334, pos=-1) at ffplay.c:1434
> 1434 av_picture_copy(&pict, &pict_src,
> (gdb) l
> 1429 pict_src.linesize[1] = src_frame->linesize[1];
> 1430 pict_src.linesize[2] = src_frame->linesize[2];
> 1431
> 1432 CHECK_AV_SEARCH_DEFAULT();
> 1433 //FIXME use direct rendering
> 1434 av_picture_copy(&pict, &pict_src,
> 1435 vp->pix_fmt, dst_width, dst_height);
> 1436 CHECK_AV_SEARCH_DEFAULT();
> 1437 #else
> 1438 sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
> (gdb) up
> #3 0x0804f53c in output_picture2 (is=0xb7238020, src_frame=0x8bd6ac0,
> pts1=0.47773333333333334, pos=-1) at ffplay.c:1501
> 1501 z = queue_picture(is, src_frame, pts, pos);
> (gdb) l
> 1496 av_get_pict_type_char(src_frame->pict_type), pts, pts1);
> 1497 #endif
> 1498 {
> 1499 int z;
> 1500 CHECK_AV_SEARCH_DEFAULT();
> 1501 z = queue_picture(is, src_frame, pts, pos);
> 1502 return z;
> 1503 }
> 1504 }
> 1505
> (gdb) up
> #4 0x0805074f in video_thread (arg=0xb7238020) at ffplay.c:1888
> 1888 ret = output_picture2(is, frame, pts, pos);
> (gdb) l
> 1883
> 1884 pts = pts_int*av_q2d(is->video_st->time_base);
> 1885 CHECK_AV_SEARCH_DEFAULT();
> 1886
> 1887 #if CONFIG_AVFILTER
> 1888 ret = output_picture2(is, frame, pts, pos);
> 1889 CHECK_AV_SEARCH_DEFAULT();
> 1890 #else
> 1891 ret = output_picture2(is, frame, pts, pkt.pos);
> 1892 CHECK_AV_SEARCH_DEFAULT();
> (gdb) up
> #5 0x005d8aff in ?? () from /usr/lib/libSDL-1.2.so.0
> (gdb)
=========================Second call where it dies=====================
> APC(0):dst(b36d1000,1024),src(b4de4a30,1952),bw:1920,h:1080;;;;
>
> Breakpoint 1, ff_img_copy_plane (dst=0xb36d1000 "", dst_wrap=1024,
> src=0xb4de4a30
> "@@@@73*&////,08<iihhhg...@de?<62>92100;DABB@>>ADHJJJIE=9333317CIAABCCDEE?77???>>=<<;;7.*!#'))#'19;?@@?...@?;9:<@AAA@@?=:85,%())))(.;ACCBBBAAAB95:AA@@??>>50&\")//)5;HNJJKLLMNNEAJUSSSSRPMK=89@><DN]_ceeeee"...,
> src_wrap=1952,
> width=1920, height=1080) at libavcodec/imgconvert.c:905
> 905 {
> (gdb) bt
> #0 ff_img_copy_plane (dst=0xb36d1000 "", dst_wrap=1024,
> src=0xb4de4a30
> "@@@@73*&////,08<iihhhg...@de?<62>92100;DABB@>>ADHJJJIE=9333317CIAABCCDEE?77???>>=<<;;7.*!#'))#'19;?@@?...@?;9:<@AAA@@?=:85,%())))(.;ACCBBBAAAB95:AA@@??>>50&\")//)5;HNJJKLLMNNEAJUSSSSRPMK=89@><DN]_ceeeee"...,
> src_wrap=1952,
> width=1920, height=1080) at libavcodec/imgconvert.c:905
> #1 0x08216e0a in av_picture_copy (dst=0xb66ff15c, src=0xb66ff190,
> pix_fmt=PIX_FMT_YUV420P, width=1920, height=1080)
> at libavcodec/imgconvert.c:986
> #2 0x0804f2e7 in queue_picture (is=0xb7238020, src_frame=0x8bd6ac0,
> pts=0.54446666666666665, pos=-1) at ffplay.c:1434
> #3 0x0804f53c in output_picture2 (is=0xb7238020, src_frame=0x8bd6ac0,
> pts1=0.54446666666666665, pos=-1) at ffplay.c:1501
> #4 0x0805074f in video_thread (arg=0xb7238020) at ffplay.c:1888
> #5 0x005d8aff in ?? () from /usr/lib/libSDL-1.2.so.0
> #6 0x00623d7e in ?? () from /usr/lib/libSDL-1.2.so.0
> #7 0x00836ab5 in start_thread () from /lib/libpthread.so.0
> #8 0x0052283e in clone () from /lib/libc.so.6
> (gdb) l
> 900 }
> 901
> 902 void ff_img_copy_plane(uint8_t *dst, int dst_wrap,
> 903 const uint8_t *src, int src_wrap,
> 904 int width, int height)
> 905 {
> 906 if((!dst) || (!src))
> 907 return;
> 908 for(;height > 0; height--) {
> 909 memcpy(dst, src, width);
> (gdb) p dst
> $1 = (uint8_t *) 0xb36d1000 ""
> (gdb) p src
> $2 = (
> const uint8_t *) 0xb4de4a30
> "@@@@73*&////,08<iihhhg...@de?<62>92100;DABB@>>ADHJJJIE=9333317CIAABCCDEE?77???>>=<<;;7.*!#'))#'19;?@@?...@?;9:<@AAA@@?=:85,%())))(.;ACCBBBAAAB95:AA@@??>>50&\")//)5;HNJJKLLMNNEAJUSSSSRPMK=89@><DN]_ceeeee"...
> (gdb) up
> #1 0x08216e0a in av_picture_copy (dst=0xb66ff15c, src=0xb66ff190,
> pix_fmt=PIX_FMT_YUV420P, width=1920, height=1080)
> at libavcodec/imgconvert.c:986
> 986 ff_img_copy_plane(dst->data[i], dst->linesize[i],
> (gdb) l
> 981 if (i == 1 || i == 2) {
> 982 h= -((-height)>>desc->log2_chroma_h);
> 983 }
> 984 av_log(NULL,
> AV_LOG_INFO,"APC(%d):dst(%x,%d),src(%x,%d),bw:%d,h:%d;;;;\n",i,
> 985 dst->data[i], dst->linesize[i], src->data[i],
> src->linesize[i], bwidth, h);
> 986 ff_img_copy_plane(dst->data[i], dst->linesize[i],
> 987 src->data[i], src->linesize[i],
> 988 bwidth, h);
> 989 CHECK_AV_SEARCH_DEFAULT();
> 990 }
> (gdb) up
> #2 0x0804f2e7 in queue_picture (is=0xb7238020, src_frame=0x8bd6ac0,
> pts=0.54446666666666665, pos=-1) at ffplay.c:1434
> 1434 av_picture_copy(&pict, &pict_src,
> (gdb) l
> 1429 pict_src.linesize[1] = src_frame->linesize[1];
> 1430 pict_src.linesize[2] = src_frame->linesize[2];
> 1431
> 1432 CHECK_AV_SEARCH_DEFAULT();
> 1433 //FIXME use direct rendering
> 1434 av_picture_copy(&pict, &pict_src,
> 1435 vp->pix_fmt, dst_width, dst_height);
> 1436 CHECK_AV_SEARCH_DEFAULT();
> 1437 #else
> 1438 sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
> (gdb) up
> #3 0x0804f53c in output_picture2 (is=0xb7238020, src_frame=0x8bd6ac0,
> pts1=0.54446666666666665, pos=-1) at ffplay.c:1501
> 1501 z = queue_picture(is, src_frame, pts, pos);
> (gdb) l
> 1496 av_get_pict_type_char(src_frame->pict_type), pts, pts1);
> 1497 #endif
> 1498 {
> 1499 int z;
> 1500 CHECK_AV_SEARCH_DEFAULT();
> 1501 z = queue_picture(is, src_frame, pts, pos);
> 1502 return z;
> 1503 }
> 1504 }
> 1505
> (gdb) up
> #4 0x0805074f in video_thread (arg=0xb7238020) at ffplay.c:1888
> 1888 ret = output_picture2(is, frame, pts, pos);
> (gdb) l
> 1883
> 1884 pts = pts_int*av_q2d(is->video_st->time_base);
> 1885 CHECK_AV_SEARCH_DEFAULT();
> 1886
> 1887 #if CONFIG_AVFILTER
> 1888 ret = output_picture2(is, frame, pts, pos);
> 1889 CHECK_AV_SEARCH_DEFAULT();
> 1890 #else
> 1891 ret = output_picture2(is, frame, pts, pkt.pos);
> 1892 CHECK_AV_SEARCH_DEFAULT();
> (gdb) up
> #5 0x005d8aff in ?? () from /usr/lib/libSDL-1.2.so.0
> (gdb)
On 07/25/2010 09:51 AM, scheutzo wrote:
>
> scheutzo<[email protected]> added the comment:
>
> It looks like my first guess was wrong.
>
> Next experiment: Please put a breakpoint on the "for" statement in
> ff_img_copy_plane, and set the breakpoint condition to width> dst_wrap.
>
> (gdb) list ff_img_copy_plane
> 900 }
> 901
> 902 void ff_img_copy_plane(uint8_t *dst, int
> 903 const uint8_t
> 904 int width, in
> 905 {
> 906 if((!dst) || (!src))
> 907 return;
> 908 for(;height> 0; height--) {
> 909 memcpy(dst, src, width);
> (gdb) break 908
> Breakpoint 1 at 0x80bd6eb: file imgconvert.c, line 908.
> (gdb) cond 1 width> dst_wrap
> (gdb) run -nodropframe -nostats -an hd-test.ts
>
> This breakpoint should trigger before you get the fatal glibc error. Please
> show
> me the output of backtrace command.
>
> (gdb) bt
>
> ________________________________________________
> FFmpeg issue tracker<[email protected]>
> <https://roundup.ffmpeg.org/issue2079>
> ________________________________________________
>
>
________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2079>
________________________________________________