This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM36x: gstreamer block with sync=true randomly

Hi,

My customer found if they used below pipeline to playback tvc_640x480.avi, after playback form some time, the gstreamer will block randomly. The problem mostly happens after video decoding finished and some audio data didn't decode yet. Pls find more detail of gstreamer used with attached Packages.make.

gst-launch filesrc location=/vfat/media/video/tvc_640x480.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mad ! alsasink  demux.video_00 ! TIViddec2 engineName=codecServer codecName=h264dec framerate=25 ! queue ! TIDmaiVideoSink displayStd=v4l2 displayDevice=/dev/video2 videoStd=AUTO videoOutput=LCD sync=true

Customer tried to set sync=false, then they didn't find such issue. So they suspected that the problem should be due to AV sync.
Customer also tried to add resizer in TIDmaiVideoSink and found the possiblity of issue is increased.
And if discarding some display frame in TIDmaiVidoSink, the possiblity of problem is reduced.

Would you pls kindly advise why sync will cause the block? Anything we can do to solve the problem? Is it a perfomrance issue? If you need the tvc_640x480.avi, pls let me know. I will share it in offline.

Packages.zip
  • Thanks Chris submit this issue for me, I add some info recently discovered.
    During playback, if the video terminate before the audio, at the point of last video frame, the audio will block for a while normally, but sometimes it block forever, It seems like a deadlock occured, after digged into the ti_gstremer code, I found that vdec_delete() function in gsttividdec2.c/gst_tividdec2_codec_stop() need much time cause the audio playback abnormally, if I call vdec_delete() after the playback stoped, this issue will not appear, I guess there may be a  bug in gst_base_audio_sink, this bug may lead to deadlock when A/V loss of synchronization, I tried with gstreamer-0.10.36 &  gst-plugins-base-0.10.36 (the newest version of gstreamer I can get) the issue is still exist.